package com.chenyun.common.event;

import com.chenyun.common.enums.LoginDeviceTypeEnum;
import com.chenyun.common.enums.LoginUserTypeEnum;
import lombok.Getter;
import lombok.Setter;
import org.springframework.context.ApplicationEvent;

/**
 * 登录登出事件分发类
 * @Author： Lonni
 * @Date： 2025/3/24  09:44
 */

@Setter
@Getter
public class LoginModelEvent  extends ApplicationEvent {
    /**
     * 1 登录  2 登出
     */
    private String loginType;
    /**
     * 用户编号
     */
    private String  userId;
    /**
     * 用户类型
     */
    private LoginUserTypeEnum userType;
    /**
     * 设备类型
     */
    private LoginDeviceTypeEnum deviceType;

    public LoginModelEvent(Object source) {
        super(source);
    }

    public LoginModelEvent(Object source, String loginType, String userId, LoginUserTypeEnum userType, LoginDeviceTypeEnum deviceType) {
        super(source);
        this.loginType = loginType;
        this.userId = userId;
        this.userType = userType;
        this.deviceType = deviceType;
    }

}
